/*
* TFBoard.h
*
* This class stores the state of the game board.
* It also gives access for modifying the board.
* 
* Author: Rapid Dojo
* Date: Oct 19, 2007
*/

#ifndef TFBOARD_H
#define TFBOARD_H

#include "TFConstants.h"
#include "TFGamePiece.h"
#include "TFGameTurn.h"
#include "TFGameMove.h"
#include "TFModelInterface.h"

//class TFGameTurn;
class TFModelInterface;

class TFBoard
{
public:
	TFBoard();
	TFBoard(TFModelInterface* model){_model = model;} ;
	~TFBoard();
	void ResetBoard();
	void ResetBoard(TF_PLAYERS player);


	HRESULT MoveTroop(TFGameTurn* myTurn, bool useRules = true);
	
	HRESULT AddPiece(int locX, int locY, TF_ADD_PIECE pieceType, TF_PLAYERS player);
	HRESULT RemovePiece(int locX, int locY);
	HRESULT ResetPiecePoints();

	TF_WINNER GameOverTest();

	TFGamePiece* GetPieceAt(int i, int j);
	
protected:
	TFModelInterface *_model;

private:
	TFGamePiece board[BOARD_DIMENSION][BOARD_DIMENSION];
};

#endif
